// api/dashboard.js
import request from '@/utils/request'

export default {
    // 获取仪表盘数据
    getDashboardData() {
        return request({
            url: '/data/api/v1/dashboard',
            method: 'get'
        })
    },

    // 获取指定天数的仪表盘数据
    getDashboardDataByDays(days) {
        return request({
            url: '/data/api/v1/dashboard/days',
            method: 'get',
            params: { days }
        })
    },

    // 刷新统计数据缓存
    refreshStatisticsCache() {
        return request({
            url: '/data/api/v1/dashboard/refresh',
            method: 'post'
        })
    }
}